package process;

import java.util.ArrayList;
import java.util.List;

public class Stack {

	public int n;
	public List<String> DS;

	public void KhoiTao() {
		n = 0;
		DS = new ArrayList<String>();
	}

	public int IsEmpty(Stack st) {
		int kq = 0;
		if (st.n == 0) {
			kq = 1;

		}

		return kq;
	}

	public int IsFull(Stack st) {
		int kq = 0;
		if (st.n == 100) {
			kq = 1;

		}
		return kq;
	}

	public String Pop(Stack st, int lengt) {
		String kq = "";
		kq = st.DS.get(lengt);
		DS.remove(lengt);
		return kq;
	}

	public void Push(Stack st, String a) {
		DS.add(a);
	}

}
